import unittest
from Test.unit_03.Page import Page
from Test.unit_03.Page2 import Page2
from selenium import webdriver
import time
class TestCase(unittest.TestCase):
    def setUp(self) -> None:
        self.driver = webdriver.Edge()
        self.driver.maximize_window()
        # self.driver.switch_to.window(self.driver.window_handles)
    def tearDown(self) -> None:
        time.sleep(2)
        self.driver.quit()
    @ unittest.skip
    def test_01(self):
        po = Page(self.driver)
        po.jiuxian_luoji()
        self.assertEqual(True, True)  # add assertion here

    def test_02(self):
        po2 = Page2(self.driver)
        po2.jiuxian2_luoji()
    def test_03(self):
        po2 = Page2(self.driver)
        po2.jiuxian_luoji()
        po2.search()
        po2.send_key_enter()
        # 断言国台旗舰店
        dy1 = po2.dy1()
        print(dy1)
        po2.goshop()
        po2.new_window()
        time.sleep(2)
        po2.scr_down(2000)
        po2.add_cart()
        time.sleep(3)
        po2.new_window()
        dy2 = po2.dy2()
        print(dy2)
        po2.addTo()
        po2.notify_clear()
        po2.notify_sned()
        po2.notify_sure()
        dy3 = po2.dy3()
        po2.notify_popSuc()






if __name__ == '__main__':
    unittest.main()
